﻿<Application x:Class="WpfApp"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:omane="clr-namespace:OMANE"
    xmlns:common="clr-namespace:OMANE.Common;assembly=OMANE.Common"
    xmlns:omaneui="clr-namespace:OMANE.Common.UI;assembly=OMANE.Common.UI"
    xmlns:omaneTheme="clr-namespace:OMANE.Common.UI.Theme;assembly=OMANE.Common.UI.Theme"
	xmlns:sys="clr-namespace:System;assembly=mscorlib"
    ShutdownMode="OnLastWindowClose">
    <Application.Resources>
        
        <ResourceDictionary>
            <omaneTheme:TypeNameToIconConverter x:Key="TypeNameToIconConverter" />
            <omaneTheme:TypeNameConverter x:Key="TypeNameConverter" />
            <omaneTheme:GlossyStyleConverter x:Key="GlossyStyleConverter" />
            <omaneTheme:CommandToIconConverter x:Key="CommandToIconConverter" />
            <omane:StringToIconConverter x:Key="StringToIconConverter" />
            <HierarchicalDataTemplate  x:Key="TopMenuItemTemplate" ItemsSource="{Binding Path=Children}"  >
                <Border BorderThickness="1" BorderBrush="Lime">
                    <Button Command="{Binding Path=Command}" Content="{Binding Path=Title}" CommandParameter="{Binding Path=Title}" />
                </Border>
            </HierarchicalDataTemplate>
     
            <DataTemplate x:Key="AccordeonItemTemplate">
                <StackPanel Orientation="Vertical" >
                    <ToggleButton Name="tb"  Height="50" Content="{Binding Path=Header}" 
                              HorizontalAlignment="Stretch" VerticalAlignment="Top"
                              IsThreeState="False">
                    </ToggleButton>
                    <TreeView Name="tv" MinHeight="200" ItemsSource="{Binding Path=Body}">
                        <TreeView.ItemTemplate>
                            <HierarchicalDataTemplate ItemsSource="{Binding Path=Children}">
                                <TextBlock Text="{Binding Path=Title}" />
                            </HierarchicalDataTemplate>
                        </TreeView.ItemTemplate>
                    </TreeView>
                </StackPanel>
            </DataTemplate>
            
            <omane:VisualUserSettings x:Key="VisualUserSettings" />

            <DataTemplate DataType="{x:Type common:UndoRedoToken}">
                
            </DataTemplate>
           
                <ResourceDictionary.MergedDictionaries>
                    <ResourceDictionary Source="pack://application:,,,/OMANE.Common.UI.Theme;component/ThemeOMANE.xaml" />
                </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>
